package com.wc.AlgoOJ_homework.AlgoOJ_BL4.A_分糖果;

/**
 * @Author congge
 * @Date 2024/4/6 9:00
 * @description http://43.138.190.70:8888/p/LQ1403?tid=660a4f84d7ba43eb2f4c549d
 */
public class Main {
    static long res = 0;

    public static void main(String[] args) {
        dfs(0, 9, 16);
        System.out.println(res);
    }

    static void dfs(int u, int n, int m) {
        if (u == 7 && n == 0 && m == 0) {
            res++;
            return;
        }
        if (u > 7) return;

        for (int i = 0; i <= n; i++) {
            for (int j = 0; j <= m; j++) {
                if (i + j <= 5 && i + j >= 2) {
                    dfs(u + 1, n - i, m - j);
                }
            }
        }
    }
}
